package com.yjzx.util.binlog.core.entiry;

import lombok.Getter;
import lombok.Setter;

/**
 * @author yjzx
 * @date 2024/7/6
 * @description
 */
@Getter
@Setter
public class Colum {
    /**
     * 在数据库表的列索引
     */
    public int inx;
    /**
     * 列名
     */
    public String colName;
    /**
     * 类型
     */
    public String dataType;
    /**
     * 数据库
     */
    public String schema;
    /**
     * 表
     */
    public String table;

    public Colum(String schema, String table, int idx, String colName, String dataType) {
        this.schema = schema;
        this.table = table;
        this.colName = colName;
        this.dataType = dataType;
        this.inx = idx;
    }
    public ColumData toColumData(){
        return new ColumData(this.inx, this.colName, this.dataType);
    }
}
